package com.xiaodu.springboot.mybatis.plus.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author: dutianjie
 * @date: 2021/5/10
 * @version: v1.0.0
 * @description: 描述
 **/
@Data
@TableName(value = "t_user")
public class UserEntity extends Model<UserEntity>{

    @TableId(value = "u_id", type = IdType.ASSIGN_ID)
    private String uId;

    @TableField(value = "u_name", condition = SqlCondition.LIKE)
    private String uName;

    @TableField(value ="is_del", fill = FieldFill.INSERT)
    // 配置 1 是 2否
    @TableLogic(value = "2", delval = "1")
    private Integer del;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime gmtCreate;

    @TableField (fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime gmtModified;

    @Version
    private Integer version;


}
